@{
    ViewData["Title"] = "首页";
}

<div class="container mt-4">
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title mb-0">死亡报告管理系统</h3>
                </div>
                <div class="card-body">
                    <div class="row">
                        <div class="col-md-6">
                            <h5>系统功能</h5>
                            <ul class="list-group">
                                @if (User.IsInRole("Doctor"))
                                {
                                    <li class="list-group-item">
                                        <a href="@Url.Action("Create", "DeathReport")" class="text-decoration-none">
                                            <i class="fas fa-plus"></i> 创建死亡报告
                                        </a>
                                    </li>
                                    <li class="list-group-item">
                                        <a href="@Url.Action("Index", "DeathReport")" class="text-decoration-none">
                                            <i class="fas fa-list"></i> 查看我的报告
                                        </a>
                                    </li>
                                }
                                @if (User.IsInRole("Admin"))
                                {
                                    <li class="list-group-item">
                                        <a href="@Url.Action("Index", "Admin")" class="text-decoration-none">
                                            <i class="fas fa-tachometer-alt"></i> 管理控制台
                                        </a>
                                    </li>
                                    <li class="list-group-item">
                                        <a href="@Url.Action("Index", "DeathReport")" class="text-decoration-none">
                                            <i class="fas fa-list"></i> 所有报告
                                        </a>
                                    </li>
                                    <li class="list-group-item">
                                        <a href="@Url.Action("Index", "Audit")" class="text-decoration-none">
                                            <i class="fas fa-chart-bar"></i> 审计统计
                                        </a>
                                    </li>
                                }
                            </ul>
                        </div>
                        <div class="col-md-6">
                            <h5>用户信息</h5>
                            <div class="card">
                                <div class="card-body">
                                    <p><strong>用户名:</strong> @User.Identity.Name</p>
                                    <p><strong>角色:</strong> 
                                        @if (User.IsInRole("Admin"))
                                        {
                                            <span class="badge bg-danger">管理员</span>
                                        }
                                        else if (User.IsInRole("Doctor"))
                                        {
                                            <span class="badge bg-primary">医生</span>
                                        }
                                    </p>
                                    <p><strong>登录时间:</strong> @DateTime.Now.ToString("yyyy-MM-dd HH:mm")</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>